<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Insert title here</title>
<link href="/resource/css/bootstrap.css" rel="stylesheet">

<script type="text/javascript" src="/resource/js/jquery-3.4.1.js"></script>
<script type="text/javascript" src="/resource/js/bootstrap.js"></script>
<script type="text/javascript" src="/resource/js/bootstrap-treeview.js"></script>
<script type="text/javascript"> 

//分页
function goPage(pageNum){
	$("#pageNum").val(pageNum);
	$("form").submit()
}


//搜索
function search(){
	var value=$.trim($("#value").val());
	if(value==''){
		alert("请输入要搜索的值");
		return ;
	}
	location.href="/search?value="+value
}
</script>
</head>
<body>
 <div>
 
 <a href="/list">返回列表</a>
  <div >
  <form action="/list">
  <input id="pageNum" type="hidden" name="pageNum">
   商品名称:<input id="value"  type="text" name="goodsName" value="${value }"> 
    <button type="button" class="btn btn-success" onclick="search()">按商品搜索</button>
  </form>
  </div>
 
 </div>
	<table class="table">
		<tr>
			<td>商品ID</td>
			<td>商品名称</td>
			<td>商品品牌</td>
			<td>商品品类</td>

		</tr>

		<c:forEach items="${info.list}" var="goods">
			<tr>
				<td>${goods.id }</td>
				<td>${goods.goodsName }</td>
				<td>${goods.bname }</td>
				<td>${goods.pname}</td>
			</tr>


		</c:forEach>

	</table>
	<jsp:include page="/resource/page/pages.jsp"></jsp:include>
</body>
</html>